home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / grafica / amhelios / helios.h < prev    next >
C/C++ Source or Header  |  1999-01-01  |  5KB  |  140 lines

  1. ////////////////////////////////////////////////////////////
  2. //
  3. //  HELIOS.H - Radiosity Renderer for MS-Windows Main Module
  4. //             Include File
  5. //
  6. //  Version:    1.03A
  7. //
  8. //  History:    94/08/23 - Version 1.00A release.
  9. //              94/09/07 - Added CheckAbort function
  10. //                         prototype.
  11. //              94/09/23 - Added AbortCalc function
  12. //                         prototype.
  13. //              94/11/25 - Added CenterDialog and
  14. //                         FileOpenHook function
  15. //                         prototypes.
  16. //              94/12/04 - Added RenderMsg function
  17. //                         prototype.
  18. //              94/12/16 - Version 1.01A release.
  19. //              95/02/05 - Version 1.02A release.
  20. //              95/03/26 - Added SetColor and DisplayBitmap
  21. //                         function prototypes.
  22. //              95/07/16 - Added DisAbleMenu and EnableMenu
  23. //                         function prototypes.
  24. //              95/07/21 - Version 1.02B release.
  25. //              95/09/18 - Added GET_WM_HSCROLL_CODE and
  26. //                         GET_WM_VSCROLL_CODE macros.
  27. //              96/02/14 - Version 1.02C release.
  28. //              96/03/03 - Added DisplayStats function
  29. //                         prototype.
  30. //              96/03/30 - Added H_LOCK, H_DOLLY, H_ORBIT,
  31. //                         H_PAN, H_ROTATE, H_TILT and
  32. //                         H_ZOOM definitions.
  33. //                       - Added SetMovementType,
  34. //                         UpdateDolly, UpdateOrbit,
  35. //                         UpdatePan, UpdateRotate,
  36. //                         UpdateTilt, UpdateZoom,
  37. //                         UpdateCameraDialog and
  38. //                         UpdateViewDialog function
  39. //                         prototypes.
  40. //              96/04/01 - Version 1.03A release.
  41. //
  42. //  Compilers:  Microsoft Visual C/C++ Professional V1.5
  43. //              Borland C++ Version 4.5
  44. //
  45. //  Author:     Ian Ashdown, P.Eng.
  46. //              byHeart Software Limited
  47. //              620 Ballantree Road
  48. //              West Vancouver, B.C.
  49. //              Canada V7S 1W3
  50. //              Tel. (604) 922-6148
  51. //              Fax. (604) 987-7621
  52. //
  53. //  Copyright 1994-1996 byHeart Software Limited
  54. //
  55. //  The following source code has been derived from:
  56. //
  57. //    Ashdown, I. 1994. Radiosity: A Programmer's
  58. //    Perspective. New York, NY: John Wiley & Sons.
  59. //
  60. //  It may be freely copied, redistributed, and/or modified
  61. //  for personal use ONLY, as long as the copyright notice
  62. //  is included with all source code files.
  63. //
  64. ////////////////////////////////////////////////////////////
  65.  
  66. #ifndef _HELIOS_H
  67. #define _HELIOS_H
  68.  
  69. static const int MaxLen = 256;
  70. static const int Offset = 2;
  71.  
  72. // Camera movement type
  73. #define H_LOCK      0
  74. #define H_DOLLY     1
  75. #define H_ORBIT     2
  76. #define H_PAN       3
  77. #define H_ROTATE    4
  78. #define H_TILT      5
  79. #define H_ZOOM      6
  80.  
  81. // Display type
  82. #define H_NONE      0   // None
  83. #define H_WIRE      1   // Wireframe
  84. #define H_BMAP      2   // Bitmap
  85.  
  86. #ifndef WIN32
  87. // WIN16 message cracking macros
  88. #define GET_WM_COMMAND_ID(wp, lp)   (wp)
  89. #define GET_WM_HSCROLL_CODE(wp, lp) (wp)
  90. #define GET_WM_VSCROLL_CODE(wp, lp) (wp)
  91. #define GET_WM_HSCROLL_POS(wp, lp)  LOWORD(lp)
  92. #define GET_WM_VSCROLL_POS(wp, lp)  LOWORD(lp)
  93. #endif
  94.  
  95. int WINAPI WinMain( HINSTANCE, HINSTANCE, LPSTR, int );
  96.  
  97. static BOOL CheckAbort();
  98. static BOOL DisplayBitmap( HWND, HWND, HMENU );
  99. static BOOL InitApplication( HINSTANCE );
  100. static BOOL InitInstance( HINSTANCE, int );
  101. static double GetDlgItemFloat( HWND, int );
  102. static void CalcWireDim( short, short, short *, short * );
  103. static void CenterDialog( HWND );
  104. static void DisableMenu( HMENU );
  105. static void DoKeyDown( HWND, WPARAM );
  106. static void EnableMenu( HMENU );
  107. static void EnableMenu( HMENU );
  108. static void SetDlgItemFloat( HWND, int, double );
  109. static void SetMovementType( HMENU, UINT );
  110. static void UpdateCameraDialog();
  111. static void UpdateDolly( int );
  112. static void UpdateOrbit (int, int );
  113. static void UpdatePan (int, int );
  114. static void UpdateRotate (int, int );
  115. static void UpdateTilt( int );
  116. static void UpdateZoom( int );
  117. static void UpdateViewDialog();
  118.  
  119. extern "C"
  120. {
  121.   LRESULT WINAPI MainWndProc( HWND, UINT, WPARAM,
  122.       LPARAM );
  123.   LRESULT WINAPI WireWndProc( HWND, UINT, WPARAM,
  124.       LPARAM );
  125.   BOOL CALLBACK About( HWND, UINT, WPARAM, LPARAM );
  126.   BOOL CALLBACK AbortCalc( HWND, UINT, WPARAM, LPARAM );
  127.   BOOL CALLBACK DisplayStats( HWND, UINT, WPARAM, LPARAM );
  128.   BOOL CALLBACK RenderMsg( HWND, UINT, WPARAM, LPARAM );
  129.   BOOL CALLBACK SetCamera( HWND, UINT, WPARAM, LPARAM );
  130.   BOOL CALLBACK SetColor( HWND, UINT, WPARAM, LPARAM );
  131.   BOOL CALLBACK SetConverge( HWND, UINT, WPARAM, LPARAM );
  132.   BOOL CALLBACK SetDisplay( HWND, UINT, WPARAM, LPARAM );
  133.   BOOL CALLBACK SetEntityDir( HWND, UINT, WPARAM, LPARAM );
  134.   BOOL CALLBACK SetView( HWND, UINT, WPARAM, LPARAM );
  135.   UINT CALLBACK FileOpenHook( HWND, UINT, WPARAM, LPARAM );
  136. }
  137.  
  138. #endif
  139.  
  140.